package com.molichuxing.services.infrastructure.dao;

import com.molichuxing.framework.dao.RootMapper;
import com.molichuxing.services.infrastructure.bean.RegionBean;
import com.molichuxing.services.infrastructure.bean.SubcompanyBean;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 分子公司 Mapper 接口
 * </p>
 *
 * @author 
 * @since 2019-08-13
 */
public interface SubcompanyMapper extends RootMapper<SubcompanyBean> {

  List<SubcompanyBean> getSubcompanyByCityId(@Param("cityIds") List<Integer> cityIds);

  List<SubcompanyBean> getSubcompanyByIds(@Param("ids") List<Integer> ids);

  @Override
  SubcompanyBean getById(Integer id);

  int getSubcompanyPageCount(@Param("name") String name, @Param("responsibleAccountName") String responsibleAccountName, @Param("regionId") Integer regionId);

  List<SubcompanyBean> getSubcompanyPage(@Param("name") String name, @Param("responsibleAccountName") String responsibleAccountName, @Param("regionId") Integer regionId,
                                    @Param("pageNum")Integer pageNum, @Param("pageSize") Integer pageSize);

  int createSubcompanyBean (SubcompanyBean subcompanyBean);

  int updateSubcompanyBean(SubcompanyBean subcompanyBean);


  List<SubcompanyBean> getSubcompanyByName(@Param("name") String name);

  SubcompanyBean getSubcompanyByFullName(@Param("fullName") String fullName);

}
